<?php

include_once 'inc/config.php';

include_once 'inc/SqlServer.php';

include_once 'inc/methods.php';


//sqlserver连接
$connect = new SqlServer();
//传入sqlserver连接参数
$connect->connect = $server;
//日志
$connect->logs = $myfile;
//连接sqlserver
$SqlLink = $connect->SqlServerConnection();
//实例化methods类
$show = new methods();
//sqlserver连接传入methods类
$show->SqlLink=$SqlLink;
//sql执行方式传入methods类
$show->SqlCarried=$SqlCarried;
//模块对应表名(节点删除时关联删除对应表内节点数据)传入methods类
$show->Module_Table=$Module_Table;
//$_POST连接传入methods类
$show->post=$_POST;
//加密key传入methods类
$show->keys=$crypt['key'];
//节点参数传入methods类
$show->parameter=$nodeParameter;
//分页参数传入methods类
$show->pages=$page;
//var_dump($_POST['action']);die;
$action = $_POST['action'];
$show->$action();




//var_dump($_POST);die;



die;
switch($action) {
case 'init_data_list':	
	$show->init_data_list();
	break;
case 'OnclickLike':

	$show->post=$_POST;
	$show->OnclickLike();
	break;
case 'addNodes':
	$show->post=$_POST;
	$show->addNodes();
	break;
case 'editNode':
	$show->post=$_POST;
	$show->editNode();
	break;
case 'removeNode':
	$show->post=$_POST;
	$show->OnclickLike();
	removeNode();
	break;
case 'moveNode':
	$show->post=$_POST;
	$show->OnclickLike();
	moveNode();
	break;
case 'performSql':
	$show->post=$_POST;
	$show->performSql();
	break;
case 'saveSql':
	$show->post=$_POST;
	$show->saveSql();
	break;
}
